package com.dayu.design.结构型.享元模式;

import java.util.Hashtable;

public class FlyweightDemo {
}

abstract class Flyweight {
    public abstract void operation();
}

class ConcreteFlyweight extends Flyweight {
    private String str;

    public ConcreteFlyweight(String str) {
        this.str = str;
    }

    @Override
    public void operation() {
        System.out.println("Concrete---Flyweight:" + str);
    }
}

class FlyweightFactory {
    private Hashtable flyweights = new Hashtable();

    public FlyweightFactory() {
    }
}
